/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package huffman;
import java.util.Iterator;


    public class SinglyLinkedListIterator<E> implements Iterator<E> {
        
        protected Node<E> current;
        
        
        public SinglyLinkedListIterator(Node a) {
            current = a;
        }
        
  
        
        public boolean hasNext() {
            return current != null;
        }
        
        public E next() {
            E temp = current.value();
            current = current.next();
            return temp;
        }
        
        public void remove() {
            
        }
               
    }
        